* A General Theory of Power Concentration: Demographic Influences on Political Organization
* European Political Science Review, 2018
* John Gerring, Matthew Maguire, and Jillian Jaeger

*******************************************************
*******************************************************
************ Main Tables and Figures ******************
*******************************************************
*******************************************************

* Table 2: Outcome measures and estimation strategies
use "Concentration_data.dta", clear
sum federalism_GT subnational_layers v2elffelrbin e_dpi_auton Decentraliz_rev_EZ wdi_gce prez_JG2 natparmms v2pscnslnl v2jureview legbalance legfralower polconiii e_dpi_checks_ln capital_pop_share_ln

* Table 3: Cross-country tests of power concentration
use "Concentration_data.dta", clear
cd "~/Desktop"
label variable PCA_index "Lagged DV"
/* 1 */ qui reg f.PCA_index Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.PCA_index Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.PCA_index Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f50.PCA_index Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.PCA_index Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.PCA_index Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.PCA_index Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.PCA_index Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') se bdec(3) excel append
restore
/* 8 */ qui reg f.PCA_index Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 9 */ qui xtreg f.PCA_index Maddison_pop_estimate_ln PCA_index e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2", e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.PCA_index e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using PCA_index.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) eqkeep(PCA_index) excel append
drop sample

* Figure 2: Predicted values
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.PCA_index Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Power concentration index") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "PCA_index.pdf", replace


*******************************************************
*******************************************************
****************** Appendix A *************************
*******************************************************
*******************************************************

* Table A2: Descriptive statistics
use "Concentration_data.dta", clear
cd "~/Desktop"
keep PCA_index federalism_GT subnational_layers v2elffelrbin e_dpi_auton Decentraliz_rev_EZ wdi_gce prez_JG2 natparmms v2pscnslnl v2jureview legbalance legfralower polconiii e_dpi_checks_ln capital_pop_share_ln Maddison_pop_estimate_ln Maddison_gdppc_1990_estimate_ln e_urbaniz *_legal_origin Latitude_ln Muslim Protestant OPEC lexical_scale Ethnolinguistic_fract_imp area_imp_ext_ln Land_use_arable_ext_1960 e_miinterc e_miinteco
order PCA_index federalism_GT subnational_layers v2elffelrbin e_dpi_auton Decentraliz_rev_EZ wdi_gce prez_JG2 natparmms v2pscnslnl v2jureview legbalance legfralower polconiii e_dpi_checks_ln capital_pop_share_ln Maddison_pop_estimate_ln Maddison_gdppc_1990_estimate_ln e_urbaniz *_legal_origin Latitude_ln Muslim Protestant OPEC lexical_scale Ethnolinguistic_fract_imp area_imp_ext_ln Land_use_arable_ext_1960 e_miinterc e_miinteco
qui outreg2 using Table_A2.doc, label replace sum(log)

* Table A3: Inter-correlation among measures of power concentration
use "Concentration_data.dta", clear
cd "~/Desktop"
mkcorr PCA_index federalism_GT subnational_layers v2elffelrbin e_dpi_auton Decentraliz_rev_EZ wdi_gce prez_JG2 natparmms v2pscnslnl v2jureview legbalance legfralower polconiii e_dpi_checks_ln capital_pop_share_ln, log(Table_A3) cdec(3) mdec(3) replace

* Table A4: Principal components analysis of measures of power concentration
use "Concentration_MI_data.dta", clear
keep if imp == 1
drop if year < 1900
pca federalism_GT subnational_layers v2elffelrbin e_dpi_auton Decentraliz_rev_EZ wdi_gce prez_JG2 natparmms v2pscnslnl v2jureview legbalance legfralower polconiii e_dpi_checks_ln capital_pop_share_ln, components(1)

* Figure A1: Histogram of population (ln)
use "Concentration_data.dta", clear
cd "~/Desktop"
hist Maddison_pop_estimate_ln, graphregion(color(white)) title("", color(black))  color(gs14) lcolor(gs7)
graph export "Figure_A1.pdf", replace

* Figure A2: Histogram of power concentration index
use "Concentration_data.dta", clear
cd "~/Desktop"
hist PCA_index, graphregion(color(white)) title("", color(black))  color(gs14) lcolor(gs7)
graph export "Figure_A2.pdf", replace

*******************************************************
*******************************************************
****************** Appendix B *************************
*******************************************************
*******************************************************

* Table B1: Federalism
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui ologit f.federalism_GT Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using federalism_GT.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) excel replace
drop sample
/* 2 */ qui ologit f.federalism_GT Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using federalism_GT.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2",e(r2_p)) excel append
drop sample
/* 3 */ qui ologit f.federalism_GT Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using federalism_GT.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 4 */ qui ologit f50.federalism_GT Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using federalism_GT.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 5 */ qui ologit f.federalism_GT Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using federalism_GT.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 6 */ qui ologit f.federalism_GT Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using federalism_GT.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mi estimate, esample(sample) post: ologit f.federalism_GT Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using federalism_GT.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years') excel append
restore
/* 8 */ qui ologit f.federalism_GT Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using federalism_GT.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 10 */ qui ivprobit f.federalism_GT e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using federalism_GT.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo likelihood", e(ll)) eqkeep(federalism_GT) excel append
drop sample

* Figure B1: Federalism
use "Concentration_data.dta", clear
cd "~/Desktop"
qui ologit f.federalism_GT Maddison_pop_estimate_ln, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans predict(outcome(1))
marginsplot, ytitle("Probability of Federalism") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "federalism_GT.pdf", replace

*******************************************************

* Table B2: Subnational government layers
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui ologit f.subnational_layers Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using subnational_layers.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel replace
drop sample
/* 2 */ qui ologit f.subnational_layers Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using subnational_layers.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 3 */ qui ologit f.subnational_layers Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using subnational_layers.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 4 */ qui ologit f50.subnational_layers Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using subnational_layers.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 5 */ qui ologit f.subnational_layers Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using subnational_layers.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 6 */ qui ologit f.subnational_layers Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using subnational_layers.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mi estimate, esample(sample) post: ologit f.subnational_layers Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using subnational_layers.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years') excel append
restore
/* 8 */ qui ologit f.subnational_layers Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using subnational_layers.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years', "Pseudo R2", e(r2_p)) excel append
drop sample
/* 10 ivregress */ qui ivregress 2sls f.subnational_layers e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using subnational_layers.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries',  "Years", `years',"Pseudo R2", e(r2)) eqkeep(subnational_layers) excel append
drop sample

* Figure B2: Subnational government layers
use "Concentration_data.dta", clear
cd "~/Desktop"
qui ologit f.subnational_layers Maddison_pop_estimate_ln, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans predict(outcome(1))
marginsplot, ytitle("Probability of Subnational government layers") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "subnational_layers.pdf", replace

*******************************************************

* Table B3: Subnational elections
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui reg f.v2elffelrbin Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.v2elffelrbin Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.v2elffelrbin Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f50.v2elffelrbin Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.v2elffelrbin Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.v2elffelrbin Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.v2elffelrbin Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.v2elffelrbin Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui reg f.v2elffelrbin Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 9 */ qui xtreg f.v2elffelrbin Maddison_pop_estimate_ln v2elffelrbin e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years', "Observations", e(N), "R2", e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.v2elffelrbin e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2elffelrbin.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) eqkeep(federalism_GT) excel append
drop sample

* Figure B3: Subnational elections
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.v2elffelrbin Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Subnational elections") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "v2elffelrbin.pdf", replace

*******************************************************

* Table B4: Autonomous regions
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui logit f.e_dpi_auton Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_auton.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel replace
drop sample
/* 2 */ qui logit f.e_dpi_auton Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_auton.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 3 */ qui logit f.e_dpi_auton Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_auton.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 4 */ qui logit f50.e_dpi_auton Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_auton.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 5 */ qui logit f.e_dpi_auton Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_auton.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year)addstat("Countries", `countries', "Years", `years',"Pseudo R2",e(r2_p)) excel append
drop sample
/* 6 */ qui logit f.e_dpi_auton Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_auton.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mi estimate, esample(sample) post: logit f.e_dpi_auton Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1975 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_auton.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years') excel append
restore
/* 8 */ qui logit f.e_dpi_auton Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_auton.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 10 */ qui ivprobit f.e_dpi_auton e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_auton.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo likelihood", e(ll)) eqkeep(e_dpi_auton) excel append
drop sample

* Figure B4: Autonomous regions
use "Concentration_data.dta", clear
cd "~/Desktop"
qui logit f.e_dpi_auton Maddison_pop_estimate_ln, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Probability of Autonomous regions") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "e_dpi_auton.pdf", replace

*******************************************************

* Table B5: Revenue decentralization
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui reg f.Decentraliz_rev_EZ Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.Decentraliz_rev_EZ Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.Decentraliz_rev_EZ Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f50.Decentraliz_rev_EZ Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.Decentraliz_rev_EZ Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.decent_rev_Fisman Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.Decentraliz_rev_EZ Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1972 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.Decentraliz_rev_EZ Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1972 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui reg f.Decentraliz_rev_EZ Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 9 */ qui xtreg f.Decentraliz_rev_EZ Maddison_pop_estimate_ln Decentraliz_rev_EZ e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.Decentraliz_rev_EZ e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol  i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Decentraliz_rev_EZ.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample

* Figure B5: Revenue decentralization
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.Decentraliz_rev_EZ Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Revenue decentralization") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "Decentraliz_rev_EZ.pdf", replace

*******************************************************

* Table B6: Government consumption
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui reg f.wdi_gce Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.wdi_gce Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.wdi_gce Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f50.wdi_gce Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.wdi_gce Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.wdi_gce Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.wdi_gce Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1961 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.wdi_gce Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1961 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui reg f.wdi_gce Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 9 */ qui xtreg f.wdi_gce Maddison_pop_estimate_ln wdi_gce e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.wdi_gce e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using wdi_gce.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample

* Figure B6: Government consumption
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.wdi_gce Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Government consumption") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "wdi_gce.pdf", replace

*******************************************************

* Table B7: Separate powers
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui logit f.prez_JG2 Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using prez_JG2.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel replace
drop sample
/* 2 */ qui logit f.prez_JG2 Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using prez_JG2.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 3 */ qui logit f.prez_JG2 Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using prez_JG2.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 4 */ qui logit f50.prez_JG2 Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using prez_JG2.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 5 */ qui logit f.prez_JG2 Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using prez_JG2.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 6 */ qui logit f.prez_JG2 Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using prez_JG2.xls, label se bdec(3) noni  nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mi estimate, esample(sample) post: logit f.prez_JG2 Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using prez_JG2.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years') excel append
restore
/* 8 */ qui logit f.prez_JG2 Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2 & sovereign == 1, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using prez_JG2.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* 10 */ qui ivprobit f.prez_JG2 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using prez_JG2.xls, label se bdec(3) noni nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Pseudo likelihood", e(ll)) eqkeep(prez_JG2) excel append
drop sample

* Figure B7: Separate powers
use "Concentration_data.dta", clear
cd "~/Desktop"
qui logit f.prez_JG2 Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Probability of Separate powers") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "prez_JG2.pdf", replace

*******************************************************

* Table B8: Divided party control
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui reg f.natparmms Maddison_pop_estimate_ln i.v2elparlel_nomiss, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.natparmms Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year i.v2elparlel_nomiss, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.natparmms Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year i.v2elparlel_nomiss, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f40.natparmms Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year i.v2elparlel_nomiss, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.natparmms Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year i.v2elparlel_nomiss if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.natparmms Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.v2elparlel_nomiss if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.natparmms Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year i.v2elparlel_nomiss if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.natparmms Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year i.v2elparlel_nomiss if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui reg f.natparmms Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year i.v2elparlel_nomiss if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 9 */ qui xtreg f.natparmms Maddison_pop_estimate_ln natparmms e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year , vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.natparmms e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol year i.v2elparlel_nomiss (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using natparmms.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample

* Figure B8: Divided party control
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.natparmms Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year i.v2elparlel_nomiss, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Divided party control") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "natparmms.pdf", replace

*******************************************************

* Table B9: Decentralized parties
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui reg f.v2pscnslnl Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2pscnslnl.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.v2pscnslnl Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2pscnslnl.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.v2pscnslnl Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2pscnslnl.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f50.v2pscnslnl Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2pscnslnl.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.v2pscnslnl Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2pscnslnl.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.v2pscnslnl Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2pscnslnl.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.v2pscnslnl Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.v2pscnslnl Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2pscnslnl.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui reg f.v2pscnslnl Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2pscnslnl.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.v2pscnslnl e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2pscnslnl.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample

* Figure B9: Decentralized parties
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.v2pscnslnl Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Decentralized parties") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "v2pscnslnl.pdf", replace

*******************************************************

* Table B10: Judicial review
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui reg f.v2jureview Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2jureview.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.v2jureview Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2jureview.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.v2jureview Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2jureview.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f50.v2jureview Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2jureview.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.v2jureview Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2jureview.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.v2jureview Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2jureview.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.v2jureview Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.v2jureview Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2jureview.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui reg f.v2jureview Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2jureview.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.v2jureview e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using v2jureview.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample

* Figure B10: Judicial review
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.v2jureview Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Judicial review") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "v2jureview.pdf", replace

*******************************************************

* Table B11: Bicameralism
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui reg f.legbalance Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.legbalance Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.legbalance Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f50.legbalance Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.legbalance Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.legbalance Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.legbalance Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.legbalance Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1900 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui reg f.legbalance Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 9 */ qui xtreg f.legbalance Maddison_pop_estimate_ln legbalance e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.legbalance e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legbalance.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample

* Figure B11: Bicameralism
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.legbalance Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Bicameralism") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "legbalance.pdf", replace

*******************************************************

* Table B12: Legislative fractionalization
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui tobit f.legfralower Maddison_pop_estimate_ln, ll vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel replace
drop sample
/* 2 */ qui tobit f.legfralower Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, ll vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 3 */ qui tobit f.legfralower Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, ll vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 4 */ qui tobit f50.legfralower Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, ll vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 5 */ qui tobit f.legfralower Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, ll vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 6 */ qui tobit f.legfralower Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, ll vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.legfralower Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1800 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.legfralower Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1800 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui tobit f.legfralower Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, ll vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 9 */ qui xtreg f.legfralower Maddison_pop_estimate_ln legfralower e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.legfralower e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using legfralower.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N)) eqkeep(legfralower) excel append
drop sample

* Figure B12: Legislative fractionalization
use "Concentration_data.dta", clear
cd "~/Desktop"
qui tobit f.legfralower Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, ll vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Legislative fractionalization") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "legfralower.pdf", replace

*******************************************************

* Table B13: Political constraints
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui tobit f.polconiii Maddison_pop_estimate_ln,ll(0) vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel replace
drop sample
/* 2 */ qui tobit f.polconiii Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year,ll(0) vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 3 */ qui tobit f.polconiii Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year,ll(0) vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 4 */ qui tobit f50.polconiii Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year,ll(0) vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 5 */ qui tobit f.polconiii Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900,ll(0) vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 6 */ qui tobit f.polconiii Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000,ll(0) vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.polconiii Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1800 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.polconiii Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1800 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui tobit f.polconiii Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2,ll(0) vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* 9 */ qui xtreg f.polconiii Maddison_pop_estimate_ln polconiii e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"Pseudo R2", e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.polconiii e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using polconiii.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N)) eqkeep(legfralower) excel append
drop sample

* Figure B13: Political constraints
use "Concentration_data.dta", clear
cd "~/Desktop"
qui tobit f.polconiii Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year,ll(0) vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Political constraints") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "polconiii.pdf", replace

*******************************************************

* Table B14: Checks & balances
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui reg f.e_dpi_checks_ln Maddison_pop_estimate_ln, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.e_dpi_checks_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.e_dpi_checks_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f50.e_dpi_checks_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.e_dpi_checks_ln Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.e_dpi_checks_ln Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.e_dpi_checks_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1975 & sovereign == 1, vce(cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.e_dpi_checks_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1975 & sovereign == 1, vce(cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui reg f.e_dpi_checks_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 9 */ qui xtreg f.e_dpi_checks_ln Maddison_pop_estimate_ln e_dpi_checks_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.e_dpi_checks_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using e_dpi_checks_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample

* Figure B14: Checks & balances
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.e_dpi_checks_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Checks and balances") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "e_dpi_checks_ln.pdf", replace

*******************************************************

* Table B15: Capital city
use "Concentration_data.dta", clear
cd "~/Desktop"
/* 1 */ qui reg f.capital_pop_share_ln Maddison_pop_estimate_ln, vce (cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* 2 */ qui reg f.capital_pop_share_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce (cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 3 */ qui reg f.capital_pop_share_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant lexical_scale Ethnolinguistic_fract_imp e_miinterc e_miinteco i.e_regionpol i.year, vce (cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 4 */ qui reg f50.capital_pop_share_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce (cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 5 */ qui reg f.capital_pop_share_ln Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year > 1900, vce (cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 6 */ qui reg f.capital_pop_share_ln Maddison_pop_estimate_ln_1900 e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol if year == 2000, vce (cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 7, MI */ preserve
qui use "Concentration_MI_data.dta", clear
qui mi import flong, m(imp) id(year country_id) 
qui mi merge 1:1 country_id year using "Concentration_PCA_data.dta"
qui mi stset, clear
qui mibeta f.capital_pop_share_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1800 & sovereign == 1, vce (cluster country_id)
qui local rsquared=e(r2_mi)
qui mi estimate, esample(sample) post: reg f.capital_pop_share_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln English_legal_origin French_legal_origin German_legal_origin Scandinavian_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if year >= 1800 & sovereign == 1, vce (cluster country_id)
qui mi xeq 1: tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui mi xeq: tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",`rsquared') excel append
restore
/* 8 */ qui reg f.capital_pop_share_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year if lexical_scale > 2, vce (cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* 9 */ qui xtreg f.capital_pop_share_ln Maddison_pop_estimate_ln capital_pop_share_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce (cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2_o)) excel append
drop sample
/* 10 */ qui ivregress 2sls f.capital_pop_share_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol year (Maddison_pop_estimate_ln = area_imp_ext_ln Land_use_arable_ext_1960), vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using capital_pop_share_ln.xls, label se bdec(3) noni noobs nor nocon nonot bracket drop(i.e_regionpol i.year) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample

* Figure B15: Capital city
use "Concentration_data.dta", clear
cd "~/Desktop"
qui reg f.capital_pop_share_ln Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce (cluster country_id)
quietly margins, at(Maddison_pop_estimate_ln=(12.5(.1)21.3)) atmeans
marginsplot, ytitle("Capital city") xtitle("Population (logged scale)") recast(line) recastci(rarea) graphregion(color(white)) title("", color(black)) ciopts(color(gs14)) title(" ", color(black)) xlab(13.8 "1 million" 16.1 "10 million" 18.4 "100 million" 20.7 "1 billion")
graph export "capital_pop_share_ln.pdf", replace

*******************************************************

* Table B16: Countries covered by each measure of power concentration


*******************************************************
*******************************************************
****************** Appendix C *************************
*******************************************************
*******************************************************

* Table C3: Within-countries tests
/* 1 */ use "Concentration_US_state_data.dta", clear
reg state_localshare_exp state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips) 
/* 2 */ reg state_localshare_genrev state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 3 */ reg state_spgs state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 4 */ reg state_indep_schooldsts state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 5 */ logit state_selection_csso state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 6 */ use "Concentration_US_county_data.dta", clear
reg county_cityshare_exp county_logpop2000 county_RuralurbanContinuumCode county_Per_Minority00 countypcinc county_PctKerry04 i.statefips
/* 7 */ reg county_cityshare_rev county_logpop2000 county_RuralurbanContinuumCode county_Per_Minority00 countypcinc county_PctKerry04 i.statefips
/* 8 */ use "Concentration_US_city_data.dta", clear
logit city_mayoral_veto city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc  i.countyfips, vce(cluster city_fips_stpla_n)
/* 9 */ logit city_term_limits_mayor city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc  i.countyfips, vce(cluster city_fips_stpla_n)
/* 10 */ logit city_mayor_council city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc  i.countyfips if city_populationinterp > 50000, vce(cluster city_fips_stpla_n)

* Table C4: State-level outcomes (US)
use "Concentration_US_state_data.dta", clear
/* 1 */ reg state_localshare_exp state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips) 
/* 2 */ reg state_localshare_exp state_logpop, vce(cluster statefips)
/* 3 */ reg state_localshare_genrev state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 4 */ reg state_localshare_genrev state_logpop, vce(cluster statefips)
/* 5 */ reg state_spgs state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 6 */ reg state_spgs state_logpop, vce(cluster statefips)
/* 7 */ reg state_indep_schooldsts state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 8 */ reg state_indep_schooldsts state_logpop, vce(cluster statefips)
/* 9 */ logit state_selection_csso state_logpop state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 10 */ logit state_selection_csso state_logpop, vce(cluster statefips)

* Table C5: County-level outcomes (US)
use "Concentration_US_county_data.dta", clear
/* 1 */ reg county_cityshare_exp county_logpop2000 county_RuralurbanContinuumCode county_Per_Minority00 countypcinc county_PctKerry04 i.statefip
/* 2 */ reg county_cityshare_exp county_logpop2000 i.statefip
/* 3 */ reg county_cityshare_rev county_logpop2000 county_RuralurbanContinuumCode county_Per_Minority00 countypcinc county_PctKerry04 i.statefips
/* 4 */ reg county_cityshare_rev county_logpop2000 i.statefips

* Table C6: City-level outcomes (US)
use "Concentration_US_city_data.dta", clear
/* 1 */ logit city_mayoral_veto city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc  i.countyfips, vce(cluster city_fips_stpla_n)
/* 2 */ logit city_mayoral_veto city_logpop i.countyfips, vce(cluster city_fips_stpla_n)
/* 3 */ logit city_term_limits_mayor city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc  i.countyfips, vce(cluster city_fips_stpla_n)
/* 4 */ logit city_term_limits_mayor city_logpop i.countyfips, vce(cluster city_fips_stpla_n)
/* 5 */ logit city_mayor_council city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc  i.countyfips if city_populationinterp > 50000, vce(cluster city_fips_stpla_n)
/* 6 */ logit city_mayor_council city_logpop i.countyfips if city_populationinterp > 50000, vce(cluster city_fips_stpla_n)

*******************************************************
*******************************************************
****************** Appendix D *************************
*******************************************************
*******************************************************

* Table D1: Cross-country tests of population and territory
use "Concentration_data.dta", clear
cd "~/Desktop"
/* PCA_index */ qui reg f.PCA_index Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel replace
drop sample
/* federalism_GT */ qui ologit f.federalism_GT Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Pseudo R2",e(r2_p)) excel append
drop sample
/* subnational_layers */ qui ologit f.subnational_layers Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* v2elffelrbin */ qui reg f.v2elffelrbin Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* e_dpi_auton */ qui logit f.e_dpi_auton Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* Decentraliz_rev_EZ */ qui reg f.Decentraliz_rev_EZ Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* wdi_gce */ qui reg f.wdi_gce Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln area_imp_ext_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* prez_JG2 */ qui logit f.prez_JG2 Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln area_imp_ext_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Pseudo R2", e(r2_p)) excel append
drop sample
/* natparmms */ qui reg f.natparmms Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln area_imp_ext_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year i.v2elparlel_nomiss, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* v2pscnslnl */ qui reg f.v2pscnslnl Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln area_imp_ext_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* v2jureview */ qui reg f.v2jureview Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln area_imp_ext_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* legbalance */ qui reg f.legbalance Maddison_pop_estimate_ln e_urbaniz Maddison_gdppc_1990_estimate_ln area_imp_ext_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* legfralower */ qui tobit f.legfralower Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, ll vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* polconiii */ qui tobit f.polconiii Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year,ll(0) vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N), "Pseudo R2", e(r2_p)) eqkeep(legfralower) excel append
drop sample
/* e_dpi_checks_ln */ qui reg f.e_dpi_checks_ln Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample
/* capital_pop_share_ln */ qui reg f.capital_pop_share_ln Maddison_pop_estimate_ln area_imp_ext_ln e_urbaniz Maddison_gdppc_1990_estimate_ln *_legal_origin Latitude_ln Muslim OPEC Protestant i.e_regionpol i.year, vce (cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using Table_D1.xls, label se bdec(3) noni noobs nor nocon nonot bracket keep(Maddison_pop_estimate_ln area_imp_ext_ln) addstat("Countries", `countries', "Years", `years',"Observations", e(N),"R2",e(r2)) excel append
drop sample

* Table D2:  Within-country tests of population and territory
/* 1 */ use "Concentration_US_state_data.dta", clear
reg state_localshare_exp state_logpop state_logsqki state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 2 */ reg state_localshare_genrev state_logpop state_logsqki state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 3 */ reg state_spgs state_logpop state_logsqki state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips) 
/* 4 */ reg state_indep_schooldsts state_logpop state_logsqki state_lnincome state_percent_urban state_pctdemvote state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips) 
/* 5 */ logit state_selection_csso state_logpop state_logsqki state_lnincome state_percent_urban state_pctdemvot state_bachelorplus state_unemploymentrate state_pctminority i.state_region, vce(cluster statefips)
/* 6 */ use "Concentration_US_county_data.dta", clear
reg county_cityshare_exp county_logpop2000 loglandarea county_RuralurbanContinuumCode county_Per_Minority00 countypcinc county_PctKerry04 i.statefips
/* 7 */ reg county_cityshare_rev county_logpop2000 loglandarea county_RuralurbanContinuumCode county_Per_Minority00 countypcinc county_PctKerry04 i.statefips
/* 8 */ use "Concentration_US_city_data.dta", clear
logit city_mayoral_veto city_logpop city_logterritory city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc i.countyfips, vce(cluster city_fips_stpla_n)
/* 9 */ logit city_term_limits_mayor city_logpop city_logterritory city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc i.countyfips, vce(cluster city_fips_stpla_n)
/* 10 */ logit city_mayor_council city_logpop city_logterritory city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc i.countyfips if city_populationinterp > 50000, vce(cluster city_fips_stpla_n)

*******************************************************
*******************************************************
****************** Appendix E *************************
*******************************************************
*******************************************************

* Table E1: Municipal sovereignty
use "Concentration_US_city_data.dta", clear
/* 1 */ logit city_chartercity city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc i.countyfips, vce(cluster city_fips_stpla_n)
/* 2 */ logit city_homerule city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc i.countyfips, vce(cluster city_fips_stpla_n)
/* 3 */ logit city_structural city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc i.countyfips, vce(cluster city_fips_stpla_n)
/* 4 */ logit city_functional city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc i.countyfips, vce(cluster city_fips_stpla_n)
/* 5 */ logit city_fiscal city_logpop city_urbanpctpop city_pctblkpopinterp city_pctasianpopinterp city_pctlatinopopinterp city_logincomepc i.countyfips, vce(cluster city_fips_stpla_n)
